home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 20 code / Pict Tricks / CLUTLess / SimpleInC.r < prev   
Encoding:
Text File  |  1994-10-14  |  4.7 KB  |  242 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2.  
  3.       Sample.r    -  Resources for the Sample Application
  4.  
  5.       Copyright Apple Computer, Inc. 1985-1987
  6.  
  7. ------------------------------------------------------------------------------*/
  8.  
  9. #include "Types.r"
  10. #include "SysTypes.r"
  11.  
  12. /* These define's are used in the MENU resources to disable specific
  13.    menu items. */
  14. #define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  15. #define MenuItem1    0b00001
  16. #define MenuItem2    0b00010
  17. #define MenuItem3    0b00100
  18. #define MenuItem4    0b01000
  19. #define MenuItem5    0b10000
  20.  
  21. type 'desa' as 'STR ';
  22.  
  23. resource 'SIZE' (-1, purgeable) {
  24.     saveScreen,
  25.     acceptSuspendResumeEvents,
  26.     disableOptionSwitch,
  27.     canBackground,
  28.     multiFinderAware,
  29.     backgroundAndForeground,
  30.     dontGetFrontClicks,
  31.     ignoreChildDiedEvents,
  32.     not32BitCompatible,
  33.     isHighLevelEventAware,
  34.     localAndRemoteHLEvents,
  35.     notStationeryAware,
  36.     dontUseTextEditServices,
  37.     reserved,
  38.     reserved,
  39.     reserved,
  40.     204800,
  41.     153600
  42. };
  43.  
  44. resource 'vers' (1) {
  45.     0x01, 0x00, release, 0x00,
  46.     verUs,
  47.     "0.00",
  48.     "0.00, Copyright © 1989 Apple Computer, Inc."
  49. };
  50.  
  51. resource 'desa' (0, purgeable) {
  52.     "Sample Picture Reading App by Macintosh Developer Technical Support"
  53. };
  54.  
  55. resource 'BNDL' (128, purgeable) {
  56.     'desa',
  57.     0,
  58.     {
  59.     'ICN#', {0, 128},
  60.     'FREF', {0, 128}
  61.     }
  62. };
  63.  
  64. resource 'FREF' (128, purgeable) {
  65.     'APPL',
  66.     0,
  67.     ""
  68. };
  69.  
  70.  
  71.  
  72. resource 'ICN#' (128, purgeable) {
  73.     {    /* array: 2 elements */
  74.         /* [1] */
  75.         $"0000 0000 07FF FFE0 0800 0010 09FF FF90"
  76.         $"0A00 0050 0A00 0050 0AF3 E750 0A88 8850"
  77.         $"0A88 8850 0A88 8650 0A88 8150 0A88 8150"
  78.         $"0AF0 8E50 0A00 0050 0A00 0050 0A00 0050"
  79.         $"09FF FF90 0800 0010 0FFF FFF0 0800 0010"
  80.         $"0800 0010 0800 0010 0800 7F10 0800 0010"
  81.         $"0800 0010 0800 0010 0800 0010 07FF FFE0"
  82.         $"0400 0020 0400 0020 0400 0020 07FF FFE0",
  83.         /* [2] */
  84.         $"0000 0000 07FF FFE0 0FFF FFF0 0FFF FFF0"
  85.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  86.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  87.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  88.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  89.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 0FFF FFF0"
  90.         $"0FFF FFF0 0FFF FFF0 0FFF FFF0 07FF FFE0"
  91.         $"07FF FFE0 07FF FFE0 07FF FFE0 07FF FFE0"
  92.     }
  93. };
  94.  
  95.  
  96. resource 'WIND' (128, "Sample Window") {
  97.     {40, 0, 280, 320},
  98.     documentProc, invisible, noGoAway, 0x0, "Sample Window"
  99. };
  100.  
  101. resource 'DLOG' (128, "About Sample…") {
  102.     {66, 102, 224, 400},
  103.     dBoxProc, visible, noGoAway, 0x0, 128, ""
  104. };
  105.  
  106. resource 'DITL' (128) {
  107.      {
  108. /* 1 */ {130, 205, 150, 284},
  109.         button {
  110.             enabled,
  111.             "Continue"
  112.         };
  113. /* 2 */ {104, 144, 120, 296},                /* SourceLanguage Item */
  114.         staticText {
  115.             disabled,
  116.             ""
  117.         };
  118. /* 3 */ {88, 144, 105, 218},                /* Author Item */
  119.         staticText {
  120.             disabled,
  121.             ""
  122.         };
  123. /* 4 */ {8, 32, 26, 273},
  124.         staticText {
  125.             disabled,
  126.             "Macintosh Programmer's Workshop"
  127.         };
  128. /* 5 */ {32, 50, 50, 392},
  129.         staticText {
  130.             disabled,
  131.             "Sample PICT massaging Application"
  132.         };
  133. /* 6 */ {56, 16, 74, 281},
  134.         staticText {
  135.             enabled, "Copyright © 1985-1993 Apple Computer"
  136.         };
  137. /* 7 */ {88, 16, 104, 144},
  138.         staticText {
  139.             enabled, "Source Language:"
  140.         };
  141. /* 8 */ {104, 16, 120, 144},
  142.         staticText {
  143.             enabled, "Brought to you by:"
  144.         }
  145.     }
  146. };
  147.  
  148. resource 'MENU' (128, "Apple", preload) {
  149.     128, textMenuProc,
  150.     AllItems & ~MenuItem2,    /* Disable item #2 */
  151.     enabled, apple,
  152.     {
  153.         "About Sample…",
  154.             noicon, nokey, nomark, plain;
  155.         "-",
  156.             noicon, nokey, nomark, plain
  157.     }
  158. };
  159.  
  160. resource 'MENU' (129, "File", preload) {
  161.     129, textMenuProc,
  162.     allEnabled,
  163.     enabled, "File",
  164.     {
  165.         "Print",
  166.             noicon, "P", nomark, plain;
  167.         "Page Setup...",
  168.             noicon, nokey, nomark, plain;
  169.         "Quit",
  170.             noicon, "Q", nomark, plain
  171.     }
  172. };
  173.  
  174. resource 'MENU' (130, "Edit", preload) {
  175.     130, textMenuProc,
  176.     AllItems & ~(MenuItem1 | MenuItem2),    /* Disable items #1 & #2 */
  177.     enabled, "Edit",
  178.      {
  179.         "Undo",
  180.             noicon, "Z", nomark, plain;
  181.         "-",
  182.             noicon, nokey, nomark, plain;
  183.         "Cut",
  184.             noicon, "X", nomark, plain;
  185.         "Copy",
  186.             noicon, "C", nomark, plain;
  187.         "Paste",
  188.             noicon, "V", nomark, plain;
  189.         "Clear",
  190.             noicon, nokey, nomark, plain
  191.     }
  192. };
  193.  
  194. resource 'MENU' (131, "Display PICT", preload) {
  195.     131, textMenuProc,
  196.     allEnabled,
  197.     enabled, "Display PICT",
  198.     {
  199.         "Original",
  200.             noicon, "D", nomark, plain;
  201.         "Modified No CLUT",
  202.             noicon, "N", nomark, plain;
  203.         "Modified Add CLUT",
  204.             noicon, "X", nomark, plain;
  205.     }
  206. };
  207.  
  208.  
  209. resource 'DITL' (129, purgeable) {
  210.     {    /* array DITLarray: 2 elements */
  211.         /* [1] */
  212.         {78, 173, 98, 243},
  213.         Button {
  214.             enabled,
  215.             "Away!"
  216.         },
  217.         /* [2] */
  218.         {31, 74, 68, 257},
  219.         StaticText {
  220.             disabled,
  221.             "This program can only print PICTs that f"
  222.             "it in memory"
  223.         }
  224.     }
  225. };
  226.  
  227. resource 'ALRT' (129, purgeable) {
  228.     {50, 30, 165, 290},
  229.     129,
  230.     {    /* array: 4 elements */
  231.         /* [1] */
  232.         OK, visible, sound3,
  233.         /* [2] */
  234.         OK, visible, sound1,
  235.         /* [3] */
  236.         OK, visible, sound2,
  237.         /* [4] */
  238.         OK, visible, sound3
  239.     }
  240. };
  241.  
  242.